using UwinEducation.Domain.Entities;

namespace UwinEducation.Domain.IRepositories
{
    public interface IUserRoleRepository : IRepository<UserRole, Guid>
    {
        /// <summary>
        /// 获取用户的角色ID列表
        /// </summary>
        Task<List<Guid>> GetRoleIdsByUserIdAsync(Guid userId);

        /// <summary>
        /// 获取用户的角色名称列表
        /// </summary>
        Task<List<string>> GetRoleNamesByUserIdAsync(Guid userId);

        /// <summary>
        /// 批量删除用户角色关联
        /// </summary>
        Task DeleteByUserIdAsync(Guid userId);

        /// <summary>
        /// 批量创建用户角色关联
        /// </summary>
        Task AddRangeAsync(IEnumerable<UserRole> userRoles);

        /// <summary>
        /// 获取用户的角色信息列表
        /// </summary>
        Task<List<(Guid Id, string Name)>> GetRoleInfosByUserIdAsync(Guid userId);
    }
}